package com.ssm.platform.pojo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ssm.basis.model.pojo.domain.BaseDo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 菜单表
 * </p>
 *
 * @author jhxxb
 * @since 2021-11-15
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("menus")
@Schema(description = "菜单表")
public class MenusDo extends BaseDo<MenusDo> {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键 ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "父 ID")
    private Long parentId;

    @Schema(description = "parent_id 确定上下级，name_link 用于查出所有下级。例上级0-，下级0-4-")
    private String idLink;

    @Schema(description = "是否为叶子节点，0(false)-表示不是，1(true)-表示是")
    private Boolean isLeafNode;

    @Schema(description = "菜单名称")
    private String name;

    @Schema(description = "跳转路径")
    private String action;

    @Schema(description = "跳转方式")
    private String actionType;

    @Schema(description = "入参")
    private String parameter;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "顺序")
    private Integer sequence;

    @Schema(description = "描述")
    private String description;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
